const components = (Vue: any) => {
  const tmp = require.context('./', true, /\.vue$/);
  tmp.keys().forEach((item: any) => {
    const tmpKey = item
      .split('/')
      [item.split('/').length - 1].replace(/.vue/g, '');
    Vue.component(tmpKey, tmp(item).default);
  });
};

export default components;
